﻿@page
@model OpenPms.Areas.D.Pages.Setup.Rate.IndexModel
@{
    ViewBag.Title = "房价码";
}
<nav aria-label='breadcrumb'>
    <ol class='breadcrumb'>
        <li class='breadcrumb-item active' aria-current='page'>@ViewBag.Title</li>
    </ol>
</nav>

<form id="FormGet">
    <desk-select-link asp-for-1=RateType asp-select-1="Html.GetEnumSelectList<ERateType>()"
                      asp-link-text-2="添加" asp-page-2="./Edit" asp-link-type-2=EButtonType.Primary />
</form>
@if (Model.RateType == ERateType.钟点房)
{
    <desk-list asp-items=Items
               asp-for-1=Item.Name asp-for-2=Item.CheckinTime asp-for-3=Item.CheckoutTime
               asp-link-text-2="编辑" asp-page-2="./Edit" asp-route-2-id=Item.Id
               asp-link-text-3="正常房价" asp-page-3="./EditPriceBefore" asp-route-3-rateId=Item.Id asp-route-3-rateName=Item.Name
               asp-link-text-4="超时房价" asp-page-4="./EditPriceBefore" asp-route-4-rateId=Item.Id asp-route-4-rateName=Item.Name asp-const-4-HourRoomLength=1 />
}
else
{
    <desk-list asp-items=Items
               asp-for-1=Item.Name asp-for-2=Item.CheckinTime asp-for-3=Item.CheckoutTime
               asp-link-text-2="编辑" asp-page-2="./Edit" asp-route-2-id=Item.Id
               asp-link-text-3="房价" asp-page-3="./EditPriceBefore" asp-route-3-rateId=Item.Id asp-route-3-rateName=Item.Name />

}

@* asp-link-text-5="房量" asp-page-5="./EditQuantity" asp-route-5-rateId=Item.Id asp-route-5-rateName=Item.Name *@
@section scripts
{
    <script>
        $(function () {
            $("#RateType").change(function () {
                $("#FormGet").submit();
            });
        });
    </script>
}